import requests

staging = "https://staging-api.miyachat.com"
local_friend = "http://127.0.0.1:2054"

cur_url = local_friend
# API 请求部分
def send_post_request(uid):
    url = cur_url + "/services/friend/FriendExtObj/FetchFriendIntimateLevelConf"
    print(url)
    headers = {
        "Content-Type": "application/json",
        "Authorization": "Bearer YOUR_ACCESS_TOKEN",  # 替换为实际Token
        "uid": str(uid)  # 从数据库中读取的UID
    }

    payload = {

    }


    try:
        response = requests.post(url, json=payload, headers=headers)
        if response.status_code == 200:
            resJson = response.json()
            print(f"UID {uid} 请求成功:", resJson)
        else:
            print(f"UID {uid} 请求失败，状态码: {response.status_code}, 响应: {response.text}")
    except requests.exceptions.RequestException as e:
        print(f"UID {uid} 请求异常:", e)

# 主逻辑
if __name__ == "__main__":
    send_post_request(5000011)